<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象的解构赋值</title>
</head>
<body>

</body>
<script>

    let {name, age} = {name: 'Mat', age: 34};

    // alert(name);

    function foo({name, age}) {
        alert(name);
        alert(age);
    }

    foo({
        name: 'test',
        age: 45
    })

</script>
</html>